package top.ochiamalu.aioj.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * oauth操作enum
 *
 * @author ochiamalu
 * @date 2025/03/12
 */
@Getter
@AllArgsConstructor
public enum OAuthOperationEnum {
    LOGIN("login", "登录"),
    BIND("bind", "绑定");

    private final String value;
    private final String desc;

    public static OAuthOperationEnum getByValue(String value) {
        for (OAuthOperationEnum operation : OAuthOperationEnum.values()) {
            if (operation.getValue().equals(value)) {
                return operation;
            }
        }
        return null;
    }
} 